package com.greateamd.timetableasy.server.dao;

import java.sql.SQLException;
import java.util.List;

import org.hibernate.HibernateException;
import org.springframework.security.access.prepost.PreAuthorize;

import com.greateamd.timetableasy.domain.Course;
import com.greateamd.timetableasy.domain.StudyPeriod;


public interface CourseDAO extends IBaseDao<Course, Integer> {

	@Override @PreAuthorize("hasRole('ROLE_ADMIN')")
	void save(Course course) throws HibernateException,SQLException;
	
	@Override @PreAuthorize("hasRole('ROLE_ADMIN')")
	public void update(Course course)throws HibernateException,SQLException,IllegalAccessException;
	
	@Override @PreAuthorize("hasRole('ROLE_ADMIN')")
	public void delete(Course course)throws HibernateException,SQLException,IllegalAccessException;

	List<Course> getAllOfStudyPeriod(StudyPeriod sp);
}
